package com.xsyj.awati.activity;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.gyf.barlibrary.ImmersionBar;
import com.xsyj.awati.R;
import com.yuang.library.base.BaseActivity;

import java.util.Arrays;
import java.util.List;

public class ArtificialBaseNewActivity extends BaseActivity implements View.OnClickListener {
    private int page = 1;
    private int rows = 10;
    private RecyclerView channelRecycle;
    private String token;
    private String channelName = "";
    private ArtificialBaseAdapter artificialBaseAdapter;
    private EditText searchRgEdit;

    private List<String> list = Arrays.asList("", "", "","","","");

    @Override
    public int getLayoutId() {
        return R.layout.activity_artificial_base_new;
    }


    @Override
    public void initView(@Nullable Bundle savedInstanceState) {
        mImmersionBar = ImmersionBar.with(this);
        mImmersionBar
                .statusBarDarkFont(true, 0.2f)
                .init();   //所有子类都将继承这些相同的属性
        channelRecycle = findViewById(R.id.channelRecycle);
        TextView headTitle = findViewById(R.id.headTitle);
        EditText searchEdit = findViewById(R.id.searchEdit);
        searchEdit.setVisibility(View.GONE);
        headTitle.setVisibility(View.VISIBLE);
        headTitle.setText("人工置数");
        artificialBaseAdapter = new
                ArtificialBaseAdapter(R.layout.artificial_base_item_layout, list);
        channelRecycle.setLayoutManager(new LinearLayoutManager(this));
        channelRecycle.setAdapter(artificialBaseAdapter);
    }

    static class ArtificialBaseAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
        public ArtificialBaseAdapter(int layoutResId, @Nullable List<String> data) {
            super(layoutResId, data);
        }

        @Override
        protected void convert(BaseViewHolder helper, String item) {

            helper.addOnClickListener(R.id.rgLiner);
            helper.addOnClickListener(R.id.rgEdit);
            helper.addOnClickListener(R.id.rgDelete);
        }
    }

    @SuppressLint("NonConstantResourceId")
    @Override
    public void onClick(View view) {
        switch (view.getId()) {

        }
    }

}